from character.models import Role
from django.contrib.auth.models import Group


def init_data():
    roles = [{"name": "admin", "level": 5},
             {"name": "staff", "level": 2},
             {"name": "marketing_manager", "level": 3},
             {"name": "marketing_staff", "level": 2},
             {"name": "finance_manager", "level": 3},
             {"name": "client", "level": 1},
             {"name": "blacklist", "level": 0},
             {"name": "chief_officer", "level": 4},
             {"name": "crawler", "level": 4},
             {"name": "boss", "level": 5}]
    groups = [{"name": "inner"},
              {"name": "partner"},
              {"name": "vip1"}]
    [Role.objects.create(**role) for role in roles]
    [Group.objects.create(**group) for group in groups]

init_data()
